In this paper, we develop a rigorous formulation of the local stress field. This approach can be used in conjuction with any first-principles method to study stress fields in complex bonded systems. In particular we investigate the induced stress fields resulting from homogeneous deformations for tetragonal PbTiO_3 and rhombohedral PbZrO_3. As an extension of these findings we also compute the induced stress fields resulting from homogeneous deformations of the (100) and (111) orderings of Pb(Zr_0.5Ti_0.5)O_3. The stress-field responses in these four materials are compared and their piezoelectric responses are discussed.